#!/bin/bash
#----------------------------------------------------
# Job script for nightly AMPS tests on 
# SDSC's Gordon system.
#----------------------------------------------------
#PBS -J AMPS_test     # Job name
#PBS -o AMPS_test.out # Name of stdout output file(%j expands to jobId)
#PBS -e AMPS_test.err # Name of stderr output file(%j expands to jobId)

#PBS -q normal              
#PBS -l nodes=1:ppn=8:native
#PBS -l walltime=2:00:00
#PBS -V #export environment variables

#The next line is required if the user has more than one project
#PBS -A TG-AST150032  # Allocation name to charge job against

# run AMPS tests compiled with GNU
cd GNU/AMPS
module purge
module load gnu/4.8.1
module load mvapich2/1.9
make test_run MPIRUN="mpirun_rsh -np 8 -hostfile $PBS_NODEFILE" 2>&1 test_amps.log
cd ../..

# run AMPS tests compiled with Intel
cd Intel/AMPS
module purge
module load intel/2013.1.117
module load mvapich2/1.9
make test_run MPIRUN="mpirun_rsh -np 8 -hostfile $PBS_NODEFILE" 2>&1 test_amps.log
cd ../..

# run AMPS tests compiled with PGI
cd PGI/AMPS
module purge
module load pgi/13.2
module load mvapich2/1.9
make test_run MPIRUN="mpirun_rsh -np 8 -hostfile $PBS_NODEFILE" 2>&1 test_amps.log
cd ../..
